<template>
  <div class="head-menu content-box">
    <el-menu
        :default-active="route.path"
        class="el-menu-demo"
        mode="horizontal"
        background-color="#545c64"
        text-color="#fff"
        :ellipsis="false"
        router
    >
      <el-menu-item index="/">
        校园交易
        <el-icon>
          <IconLogo></IconLogo>
        </el-icon>
      </el-menu-item>
      <div class="flex-grow"/>
      <el-menu-item index="/serve/re-market/sku/list">首页</el-menu-item>
      <el-menu-item index="/serve/re-market/sku/create">发布</el-menu-item>
      <el-menu-item index="/serve/re-market/sku/person">我的</el-menu-item>
    </el-menu>
  </div>
  <div class="content2-box" style="padding-top: 20px">
    <router-view></router-view>
  </div>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import {useRoute} from "vue-router";

const route = useRoute()
</script>

<style scoped>
.head-menu{
  background-color: #545c64;
}
.content2-box{
  padding: 0 calc((100vw - 1400px) / 2);
}
</style>
